package com.blazer.a;

import java.util.Scanner;

public class switchdemo {
    public static void main(String[] args) {
        //switch能匹配的类型数据 byte short int char
        Scanner scanner=new Scanner(System.in);
        int num=scanner.nextInt();
//如果没有break会出现case穿透性，一直向下执行
        switch (num){
            case 1:
                System.out.println("执行1");
                break;
            case 2:
                System.out.println("执行2");
                break;
            case 3:
                System.out.println("执行3");
                break;
            default:
                System.out.println("下面没有了");
                break;
        }

    }
}
